package com.yayyay.jwt.controller;

import com.yayyay.commom.utils.ResultBean;
import com.yayyay.jwt.model.dto.UserDTO;
import com.yayyay.jwt.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: liangSY
 * @Date: 2021/9/22 14:32
 * @ClassName: UserController
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    UserService userService;

    @PostMapping("/add")
    public ResultBean add(UserDTO dto){
        userService.addSysUser(dto);
        return ResultBean.success();
    }

}
